/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       drag_creature.h

	$Header: /game/drag_creature.h $

	$NoKeywords: $

 ************************************************************************/
#ifndef DRAG_CREATURE_H_INCLUDED
#define DRAG_CREATURE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "bitmap_group_ptr.h"
#include "bitmap_layer_ptr.h"
#include "creature_array_window_ptr.h"
#include "creature_stack.h"
#include "drag_object.h"

class t_creature_array;
// --------------------------------------------------------
// drag and drop object for creatures
// --------------------------------------------------------
class t_drag_creature : public t_drag_object
{
public:
	t_drag_creature( t_creature_stack* creature, t_creature_array_window* source_window,
		             int source_slot, int transfer_charge, bool use_split_dialog );
	virtual ~t_drag_creature();

	virtual void				accepted( t_window* window );
	t_creature_stack*			get_data() const;
	int							get_number() const;
	int							get_slot() const;
	t_creature_array_window*	get_source_window() const;
	void						swap( t_creature_stack_ptr& arg, int transfer_charge );
	int							get_transfer_charge() const;
	bool						use_split_dialog() const;
protected:
	bool                        m_use_split_dialog;
	t_bitmap_group_ptr			m_rings;
	t_bitmap_layer_ptr          m_portrait;
	t_creature_stack_ptr        m_data;
	t_creature_array_window_ptr m_source_window;
	int                         m_source_slot;
	int	                        m_transfer_charge; // if source was charged a transfer
	                                                // fee in movement
};

inline int t_drag_creature::get_transfer_charge() const
{
	return m_transfer_charge;
}

inline bool t_drag_creature::use_split_dialog() const
{
	return m_use_split_dialog;
}

inline t_creature_stack* t_drag_creature::get_data() const
{
	return m_data;
}

inline int t_drag_creature::get_number() const
{
	return m_data->get_number();
}

inline int t_drag_creature::get_slot() const
{
	return m_source_slot;
}

inline t_creature_array_window* t_drag_creature::get_source_window() const
{
	return m_source_window;
}

#endif // DRAG_CREATURE_H_INCLUDED